1. Field of the Invention
The present invention relates to a digital filter and a method of digital filtering, a digital data rate converter and a method of digital data rate conversion, and a method and apparatus for modulating and/or demodulating a digital signal.
2. Description of the Prior Art
In a typical finite impulse response digital filter, an output sample is obtained by obtaining the product of an input sample and a coefficient and combining that product with one or more products of other input samples with respective coefficients so that each output sample is made up of contributions from several input samples and each input sample contributes to a corresponding number of output samples. In an infinite impulse response digital filter, an output sample is obtained by obtaining the product of an input sample and a coefficient and combining this with one or more products of preceding output samples and corresponding coefficients, and normally also one or more products of other input samples and corresponding coefficients. The values of the coefficients in such a filter represent the shape of the impulse response.
In a known digital filtering technique for changing the data rate of digital samples, the digital sample stream is passed through an interpolation filter and then through a decimation falter. The interpolation filter increases the digital sample rate by an integer value so as to provide a digital data stream having a data rate which is a common multiple of the input data rate and the desired output data rate (often the lowest common multiple). The interpolation falter has to generate the additional sample values required, and may do this by interpolating between input sample values. The decimation filter receives the increased rate signal and reduces its data rate by an integer value to obtain the desired output data rate, by passing only an appropriate proportion of its input data samples to its output. Thus, if for example a data rate of 50 samples per second is converted to 30 samples per second, the interpolation filter triples the number of samples to provide a digital data stream at 150 samples per second, and the decimation filter receives the signal at 150 samples per second and outputs every 5th sample so as to provide a data stream at 30 samples per second. The choice of data rate conversions which can be performed with such a technique is limited by the need to obtain a sample rate for the data stream between the two filters which is a common multiple of the desired input and output sample rates.
In apparatus for modulating a data signal onto a carrier, or apparatus for demodulating such a signal to recover the data, or an apparatus which performs both functions (all of which will be referred to generically as a modem in the present specification), it is often convenient for part of the modulating or demodulating procedure to be carried out digitally. Normally, it will be desirable to have a stream of digital samples representing data symbols modulated onto the carrier signal, at a sample rate which is substantially greater than the rate at which data symbols appear in the data to be modulated onto or demodulated from the carrier (the symbol rate). In a demodulator, the samples will be obtained from an input analog signal representing the modulated carrier by an analog-to-digital converter and in a modulator the digital samples will be converted into an analog modulated carrier signal by a digital-to-analog converter.
At some point in the processing of the digital signals within the modem, it will be necessary to convert the digital data rate between the sample rate for the ADC or DAC and the symbol rate of the data modulated on the carrier. In order to provide a practical modem design, the ADC or DAC may be driven by a clock to define a sample rate which is an integer multiple of the symbol rate, so that for demodulation the sample rate is converted to the symbol rate by a decimation filter and for modulation the symbol fate is converted to the sample rate by interpolation. The sample rate can instead be a rational non-integer multiple of the symbol rate, in which case both a decimation filter and an interpolation filter will be required. In either case, the clock rate for the ADC or the DAC must be chosen with reference to the symbol rate (or the baud rate) at which the modem is intended to operate, and for a modem capable of operating at several rates it will normally be necessary to provide an arrangement for controlling and selecting the ADC or DAC clock rate in accordance with the symbol rate being used at any particular time.